<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
</head>
<body>
  <input type="text" id="input" placeholder="输入文本">
  <button id="pasteBtn">粘贴</button>
  <button id="sendBtn">发送</button>

  <script>
    const { ipcRenderer } = require('electron');

    // 监听发送按钮点击事件
    document.getElementById('sendBtn').addEventListener('click', () => {
      // 模拟按下 Ctrl+V 组合键
      ipcRenderer.send('perform-paste');
      // 模拟按下回车键
      ipcRenderer.send('perform-enter');
    });

    // 监听粘贴按钮点击事件
    document.getElementById('pasteBtn').addEventListener('click', () => {
      // 模拟按下 Ctrl+V 组合键
      ipcRenderer.send('perform-paste');
    });
  </script>
</body>
</html>
